<?php
class User_related_self_model extends BZ_Model
{
    protected $table = 'user_related_self';

    /**
     * 根据供应商账号获取对应信息
     * @param $provider_uid
     * @return mixed
     */
    public function providerFxReult($provider_uid)
    {
        $this->db->select('id, provider_uid, reseller_uid, poundage');
        $this->db->from($this->table);
        $this->db->where('provider_uid', $provider_uid);
        $this->db->where('flag', '1');
        return $this->db->get();
    }

    /**
     * 根据分销商账号对应信息
     * @param $reseller_uid
     * @return mixed
     */
    public function resellerFxReult($reseller_uid)
    {
        $this->db->select('id, provider_uid, reseller_uid, poundage');
        $this->db->from($this->table);
        $this->db->where('reseller_uid', $reseller_uid);
        $this->db->where('flag', '1');
        return $this->db->get();
    }
}